ws_dir = Pathname.new(__dir__)
ws_dir = ws_dir.parent until
  File.exist?("#{ws_dir}/node_modules/react-native-test-app/test_app.rb") ||
  ws_dir.expand_path.to_s == '/'
require "#{ws_dir}/node_modules/react-native-test-app/test_app.rb"

workspace 'example.xcworkspace'

# Use prebuilt RN.
ENV['RCT_USE_RN_DEP'] = '1'
ENV['RCT_USE_PREBUILT_RNCORE'] = '1'

new_arch_enabled = ENV['NEW_ARCH_ENABLED'].nil? ? true : ENV['NEW_ARCH_ENABLED'] == 'true'

options = {
  :bridgeless_enabled => new_arch_enabled,
  :fabric_enabled =>  new_arch_enabled,
  :hermes_enabled => true,
}

use_test_app! options do |target|
  pod 'stripe-react-native', path: '../node_modules/@stripe/stripe-react-native', testspecs: ['Tests']
  pod 'stripe-react-native/Onramp', path: '../node_modules/@stripe/stripe-react-native'
end
